package com.lwp.spring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * IndexController
 *
 * @author lanwenping
 * @version 1.0
 * @date 2020/6/7 13:58
 */
@Controller
public class IndexController {

    @RequestMapping("/index")
    public String index() {
        System.out.println("这里到首页去");
//        new ModelAndView("index");
/*        //转发方式1
        return "home.jsp";
        //转发方式2
        return "forward:index.jsp";
        //重定向方式
        return "redirect:index.jsp";*/
        return "index";
    }
}
